package cn.wl.pchart.tools;

import com.alibaba.fastjson.JSONObject;

import java.util.concurrent.Callable;

// 抽象类，以便进行回调实现
abstract public class OperatorCallback implements Callable<String> {

    protected JSONObject rawJson = null;
    protected JSONObject returnJson = null;

    public JSONObject getRawJson() {
        return rawJson;
    }

    public void setRawJson(JSONObject rawJson) {
        this.rawJson = rawJson;
    }

    public JSONObject getReturnJson() {
        return returnJson;
    }

    public void setReturnJson(JSONObject returnJson) {
        this.returnJson = returnJson;
    }

    public void init() {
        rawJson = new JSONObject();
        returnJson = new JSONObject();
    }

    // 继承父类call方法后抽象
    @Override
    public abstract String call() throws Exception;
}
